<!--
<div id="pagepro" class="w920">
	<form action="" id="searchform" method="get">
				<p>
					<input type="text" id="searched_content" class="box" name="keyword" />
					<input type="submit" class="button" value="Search" />
				</p>
			</form>
</div> 
-->
<script type="text/javascript">
<!--
function toggleCategory(id) {
	idString = 'subCategory' + id;
	$('#'+idString).toggle();
}
//-->
</script>
<div id="content" class="w920" style="border-top:0;">
	<div class="conleft" style="border-right:1px solid #bcbec0;padding-right:0;width:920px;">
		<div class="pinlist">
			<div class="menu">
				<ul>
					<?php foreach ($this->categories as $category) {?>
					<li style="font-weight:bold;color:#ccc; background-color:#FFCC66;"><a href="/artwork?catId=<?=$category['self']->id?>"><?=$category['self']->name?></a>
						
							<?php
							$childs = $category['childs'];
							if($childs){
								?>
								<ul id="subCategory<?=$category['self']->id?>" >
								<?php 
							foreach ($childs as $subCategory) {
								if ($this->currentCategory instanceof Model_ArtworkCategory && $this->currentCategory->id == $subCategory->id) {
									$style = 'font-weight:bold;color:#ccc;';
								} else {
									$style = '';
								}
								?>
								<li><a href="/artwork?category=<?php echo $subCategory->id;?>" style="<?php echo $style;?>"><?=$subCategory->name?></a></li>
							<?php 
									}
									?>
									</ul>
									<?php 

								}// end of foreach $childs?>
						
					</li>
					<?php } // end of foreach $this->categories?>
				</ul>
			</div>
			<div class="prolist">
				
				<?php foreach ($this->artworks as $artwork) {?>
				<dl>
					<dt><a href="/artwork/show?id=<?=$artwork->id?>"><img src="<?=$artwork->getPhotoWebAccessablePath('70x70');?>" alt="<?=$this->escape($artwork->name)?>" /></a></dt>
					<dd>
						<ul>
							<li><b>作品:</b><a href="/artwork/show?id=<?=$artwork->id?>"><?=$this->escape($artwork->name)?></a></li>
							<li><b>货号:</b><?=$this->escape($artwork->good_num)?></li>
							<li><b>规格:</b><?=$this->escape($artwork->inch_size  ." / ". $artwork->size)?></li>
							<li><b>分类:</b><?=$this->escape($this->categoriesMap[$artwork->category])?></li>
							<li><b>售价(美元):</b>
							<?php
							
									echo $artwork->usd_price;
									
							?></li>
						</ul>
					</dd>
				</dl>
				<?php }?>
				<ul class="page">
					<?=$this->pager?>
				</ul>
			</div>
		</div>
	</div>
</div>
